﻿namespace Microsoft.VisualStudio.IDE.ToolboxControlsInstaller
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Reflection;

    internal class SilverlightAssembly : XamlAssembly
    {
        private static List<string> _exclusionlist = new List<string>(new string[] { 
            "System.Windows.Controls.AutoCompleteBox", "System.Windows.Controls.Border", "System.Windows.Controls.Button", "System.Windows.Controls.Calendar", "System.Windows.Controls.Canvas", "System.Windows.Controls.CheckBox", "System.Windows.Controls.ComboBox", "System.Windows.Controls.ContentControl", "System.Windows.Controls.DataGrid", "System.Windows.Controls.DataPager", "System.Windows.Controls.DatePicker", "System.Windows.Shapes.Ellipse", "System.Windows.Controls.Frame", "System.Windows.Controls.Grid", "System.Windows.Controls.GridSplitter", "System.Windows.Controls.HyperlinkButton", 
            "System.Windows.Controls.Image", "System.Windows.Controls.Label", "System.Windows.Controls.ListBox", "System.Windows.Controls.MediaElement", "System.Windows.Controls.MultiScaleImage", "System.Windows.Controls.PasswordBox", "System.Windows.Controls.ProgressBar", "System.Windows.Controls.RadioButton", "System.Windows.Shapes.Rectangle", "System.Windows.Controls.Primitives.ScrollBar", "System.Windows.Controls.ScrollViewer", "System.Windows.Controls.Slider", "System.Windows.Controls.StackPanel", "System.Windows.Controls.TabControl", "System.Windows.Controls.TextBlock", "System.Windows.Controls.TextBox", 
            "System.Windows.Controls.TreeView"
         });
        private const string DefaultTargetFramework = "Silverlight,Version=v3.0";
        private const string SilverlightCommon = "Silverlight Common";
        private const string SilverlightControls = "Silverlight Controls";

        public SilverlightAssembly(AssemblyName assemblyName) : base(assemblyName)
        {
        }

        protected override DictionaryControl CreateControl(string fullTypeName, IDictionary toolProperties)
        {
            return new SilverlightControl(fullTypeName, toolProperties);
        }

        protected override int ClipFormat
        {
            get
            {
                return SilverlightControl._silverlightFormat;
            }
        }

        protected override string DefaultFramework
        {
            get
            {
                return "Silverlight,Version=v3.0";
            }
        }

        protected override List<string> ExclusionList
        {
            get
            {
                return _exclusionlist;
            }
        }

        protected override AssemblyName FrameworkElementAssemblySpec
        {
            get
            {
                return new AssemblyName("System.Windows");
            }
        }

        public override string Identifier
        {
            get
            {
                return StaticIdentifier;
            }
        }

        protected override string InvariantAllItemsCategory
        {
            get
            {
                return "Silverlight Controls";
            }
        }

        protected override string InvariantCommonCategory
        {
            get
            {
                return "Silverlight Common";
            }
        }

        public static string StaticIdentifier
        {
            get
            {
                return "Silverlight";
            }
        }
    }
}

